﻿@{
    Layout = null;
    var siteConfig = new Ec_System.Facade.Web.SiteConfigFacade();
}
@model Ec_System.Models.Web.ShopProductData

<!--评论Ajax-->
<script type="text/javascript">
    var pageSize = 10;
    $(function () {
        $("#Pagination").pagination(@Model.EvaluationCount, {
            num_edge_entries: 1, //边缘页数
            num_display_entries: 10, //主体页数
            callback: paginationCallback, //回调函数
            items_per_page: pageSize, //每页显示多少项
            prev_text: "前一页",
            next_text: "后一页"
        });
    })
   
    function paginationCallback(page_Index, jq){
        $.post("/ShopProduct/GetEvaluationList",  { "productID" : @Model.ProductID, "pageSize" : pageSize, "pageIndex" : page_Index }, function(result){
            var str = "";
            $("#List").children().filter("li").remove();
            $.each(result, function(index, item){
                if(item.ReplayContent != null ){
                    str = "<li><div class='jianju'><font class='f2'>"
                        + item.InUser +
                        " 评论于</font><font class='f3'>"
                        + item.Indate +
                        "</font><div class='score-no score-"
                        + item.ServiceStar +
                        "'></div><p>"
                        + item.Contents +
                        "</p><div class='blank'></div><div><font class='f2'>卖家回复于</font><font class='f3'>"  + item.ReplayDate +
                        "</font></biv><p>"
                        + item.ReplayContent +
                        "</p> <class='blank5'></div></div></li>";
                }
                else{
                    str = "<li><div class='jianju'><font class='f2'>" + item.InUser + "</font><font class='f3'>" + item.Indate + "</font><div class='score-no score-" + item.ServiceStar + "'></div><p>" + item.Contents + "</p><div class='blank'></div><div class='blank5'></div></div></li>";
                }
                $("#List").append(str);
            });

        });
    }
</script>


<div class="blank"></div>
<div class="block box">
    <div class="box">
        <div class="box_1">
            <div class="ur_here">
                <a href="@siteConfig.ThisSiteUrl">首页</a>
                <code>&gt;</code> 产品详情 <code>&gt;</code> <a href="@siteConfig.ThisSiteUrl">              
                </a>
            </div>
            <div class="blank"></div>
            <div class="clearfix" id="goodsInfo">
                <div class="imgInfo">
                    <img id="imgs" src="@siteConfig.ImageServer/Product/260260@{@Model.ImageUrl}"
                         zoompic="@siteConfig.ImageServer/Product/800800@{@Model.ImageUrl}">
                </div>
                <div class="textInfo">
                    <form id="carForm" action="/ShopCart/AddShopCart" method="post" neme="carForm">
                        @Html.AntiForgeryToken();
                        <div>
                            <h1>
                                @Html.Raw( Model.ShopProductTitle)
                                <br>
                                <span style="color: red;">
                                    @Html.Raw( Model.SecondTitle.Length > 23 ? Model.SecondTitle.Substring(0, 23) + "<br />" + Model.SecondTitle.Substring(23, Model.SecondTitle.Length - 23) : Model.SecondTitle )
                                                                   
                                </span>
                            </h1>
                            <div class="blank"></div><input name="number" id="number" style="display: none;" onblur="changePrice()" type="text" size="4" value="1">
                        </div>
                        <ul>
                            <div style="height: 110px; overflow: hidden;">
                                <li>
                                    <dd class="show_goods_amount">
                                        <span class="p-price-title">本站原价：</span><b class="shop" id="p-price">￥@Model.MarketPrice</b>
                                    </dd>
                                    <dd class="show_goods_amount">
                                        <span class="p-price-title">本站现价：</span><b class="shop" id="p-price">￥@Model.ShopPrice</b>
                                    </dd>
                                    <dd>
                                        <span class="p-price-title">请输入购买数量：</span><input name="txt_Num" class="text required number min" id="buy-num" value="1"><span class="p-price-title">斤 (*支持小数点)</span>
                                    </dd>
                                    <dd class="show_goods_amount">
                                        <span class="p-price-title">本商品默认不支持配送，请选择就近经销商购买自提，如果需要配送，请拨打商家电话联系！</span>
                                    </dd>
                                </li>
                            </div>
                            <li class="goods_bnt">
                                <div class="f_l">
                                    <input name="hid_ProductID" id="hid_ProductID" type="hidden" value="@Model.ProductID">
                                    <input name="hid_ItemNumber" id="hid_ItemNumber" type="hidden" value="@Model.ItemNumber">
                                    <input name="hid_VendorNumber" id="hid_VendorNumber" type="hidden" value="@Model.VendorNumber">

                                    <input class="bnt_buy3" type="submit" value="">
                                </div>
                            </li>
                        </ul>
                    </form>
                    <div style="top: 0px; right: 0px; position: absolute;">
                        <div class="sp-singleAct">
                            <span></span>
                            <dl>
                                <dt>
                                <dd>卖    家：@Model.ShopName</dd>
                                <dt>
                                <dd>店铺认证：<img width="16" height="16" src="StoreImprove.png"></dd>
                                <div class="line"></div>
                                <dt>
                                <dd>综合评分：@Model.Star</dd>
                                <dt>
                                <dd>公司名称：@Model.VendorName</dd>
                                <dt>
                                <dd>品牌名称：@Model.BrandName</dd>
                                <div class="line"></div>
                                <dt>
                                <dd>所在地区：@Model.ShippingArea</dd>
                                <dt>
                                <dd>联系电话：@Model.PhoneNum</dd>
                                <div class="line"></div>
                                <dt>
                                <dd>
                                    <a href="http://www.guoshuhui.com/shop/@Model.VendorNumber"
                                       target="_blank">进入卖家店铺</a>
                                </dd>
                            </dl>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>


@*以下是描述*@
<div class="blank"></div>
<div class="blank"></div>
<div class="block box">
    <!--掌柜推荐开始-->
    <div class="AreaL" style="float: right;">
        <div class="box">
            <div class="box_1" style="border-bottom-color: currentColor; border-bottom-width: medium; border-bottom-style: none;">
                <h3><span title="店长推荐">掌柜推荐</span></h3>
                <div class="boxCenterList clearfix" id="bossRecommend">
                    @foreach (var item in Model.ShopProductTop5)
                    {
                        <ul class="clearfix">
                            <li class="goodsimg">
                                <a target="_blank" href="/Item/@item.ProductID">
                                    <img src="@siteConfig.ImageServer/Product/128128@{@item.ImageUrl}" class="B_blue">
                                </a>
                            </li>
                            <li>
                                <a target="_blank" class="name" href="/Item/@item.ProductID">@item.ShopProductTitle</a>原价：<del>@item.MarketPrice</del>
                                <font class="f1">优惠价：@item.ShopPrice</font><br>
                            </li>
                        </ul>
                    }
                </div>
            </div>
        </div>
        <div class="blank"></div>
    </div>
    <!--掌柜推荐结束-->

    <div class="AreaR" style="float: left; position: relative;">
        <div class="slideTxtBox">
            <div class="hd">
                <ul>
                    <li>详细描述</li>
                    <li>用户评价</li>
                    <li>服务保障</li>
                    <li>常见问答</li>
                </ul>
            </div>
            <div class="bd">
                <!--详细描述开始-->
                <ul>
                    <div class="blank"></div>
                    <div class="content">
                        @Html.Raw(Model.ShopProductDescription)
                    </div>
                </ul>
                <!--详细描述结束-->

                <!--用户评价开始-->
                <ul>
                    <div class="box_1">
                        <h3 class="h3_3">
                            <span class="text">用户评论</span>(共<font class="shop">@Model.EvaluationCount</font>条评论)
                        </h3>
                        <div class="boxCenterList clearfix" style="padding: 15px 0px; height: 1%;">
                            <ul class="comments" id="List" style="padding: 0px; border: currentColor; border-image: none;"></ul>
                            <div class="quotes" id="Pagination"></div>
                        </div>
                    </div>
                </ul>
                <!--用户评价结束-->

                <!--服务保障开始-->
                <ul>
                    <div class="blank5"></div>
                    <div class="blank"></div>
                    <ul class="goods_fuwu clearfix">
                        @Html.Raw(siteConfig.SiteServiceCommitment)
                    </ul>
                </ul>
                <!--服务保障结束-->

                <!--常见问答开始-->
                <ul>
                    <div class="blank"></div>
                    <div class="blank5"></div>
                    <ul class="goods_wenda clearfix">
                        @Html.Raw(siteConfig.SiteQuestionAnswer)
                    </ul>
                </ul>
                <!--常见问答结束-->
            </div>
        </div>
        <script type="text/javascript">jQuery(".slideTxtBox").slide({ trigger: "click" });</script>
    </div>
